<template>
  <el-card class="app-container">
    <c-u-r-d-table :option="option"/>
  </el-card>
</template>

<script>

import ColumnType from '@/framework/constant/ColumnType'
import {tagApi} from '@/feature/lms/infra/api/tagApi'
import CURDTable from '@/framework/components/table/CURDTable'

export default {
  components: {CURDTable},
  data() {
    return {
      option: {
        requestApi: tagApi,
        loadDetail: true,
        showSelection: false,
        dialogWidth: '600px',
        columns: [
          {
            label: '标签名称',
            span: 24,
            required: true,
            prop: 'tagName',
            searchable: true
          },
          {
            label: '标签封面',
            prop: 'tagCover',
            span: 24,
            required: true,
            type: ColumnType.IMAGE,
            width: 80
          },
          {
            label: '标签banners',
            prop: 'photoList',
            span: 24,
            limit: 10,
            dataType: 'array',
            hiddenInTable: true,
            required: true,
            type: ColumnType.IMAGE,
            width: 80
          },
          {
            label: '创建时间',
            type: ColumnType.DATETIME,
            hiddenInForm: true,
            prop: 'gmtCreate'
          },
          {
            label: '修改时间',
            type: ColumnType.DATETIME,
            hiddenInForm: true,
            prop: 'gmtModified'
          }
        ]
      }
    }
  },
  methods: {}
}
</script>

